<?php
	
	header('Content-type:text/html;charset=utf-8');
	$method = $_POST['f_method'];
	$method_v = $_POST['f_method_v'];
	$title = $_POST['f_title'];
	$content = $_POST['f_content'];
	
	$link = mysql_connect('localhost','root','root');
	$z = mysql_select_db('users',$link);
	$sql = "insert into guestmessage values (null,'$method','$method_v','$title','$content',now())";
	$qry = mysql_query($sql);
	
	echo mysql_error();
	
	if($qry){
		
		header('Refresh:3;url=add_show1.php');
		echo '留言成功';
	}else{
		header('Refresh:3;url=add_show1.php');
		echo '留言失败';
	}
?>